﻿<metro:Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:metro="http://schemas.codeplex.com/elysium"
        xmlns:params="http://schemas.codeplex.com/elysium/params"
        xmlns:View="clr-namespace:Microsoft.Expression.Blend.View;assembly=Microsoft.Expression.Blend"
        x:Name="window_main" x:Class="WGM.MainWindow"
        Title="Protogamez WGM" Height="530" Width="1050" WindowStartupLocation="CenterScreen" BorderThickness="0" Loaded="window_main_Loaded" ResizeMode="CanMinimize" Foreground="White" MinWidth="1050" MinHeight="530" Background="{Binding Background, ElementName=theme_element1}" MaxWidth="1050" metro:Window.IsMainWindow="True" AllowsTransparency="False" HasDropShadow="True">

    <metro:Window.Resources>
        <Storyboard x:Name="framemove" x:Key="framemove" Completed="framemove_completed">
            <ThicknessAnimation Storyboard.TargetName="frame_main" Storyboard.TargetProperty="Margin" From="0,0,0,0" To="-1044,0,1044,0" Duration="0:0:0.2" BeginTime="0:0:0" />
            <DoubleAnimation Storyboard.TargetName="frame_main" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:0.2" BeginTime="0:0:0" />
        </Storyboard>
        <Storyboard x:Name="framemoveCom" x:Key="framemoveCom">
            <ThicknessAnimation Storyboard.TargetName="frame_main" Storyboard.TargetProperty="Margin" From="1044,0,-1044,0" To="0,0,0,0" Duration="0:0:0.3" BeginTime="0:0:0" />
            <DoubleAnimation Storyboard.TargetName="frame_main" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:0.3" BeginTime="0:0:0" />
        </Storyboard>
        <Storyboard x:Name="framemoveloading" x:Key="framemoveloading" Completed="framemove_completedloading">
            <ThicknessAnimation Storyboard.TargetName="frame_main" Storyboard.TargetProperty="Margin" From="0,0,0,0" To="-1044,0,1044,0" Duration="0:0:0.2" BeginTime="0:0:0" />
            <DoubleAnimation Storyboard.TargetName="frame_main" Storyboard.TargetProperty="Opacity" From="1" To="0" Duration="0:0:0.2" BeginTime="0:0:0" />
        </Storyboard>
        <Storyboard x:Name="framemoveComloading" x:Key="framemoveComloading">
            <ThicknessAnimation Storyboard.TargetName="frame_main" Storyboard.TargetProperty="Margin" From="1044,0,-1044,0" To="0,0,0,0" Duration="0:0:0.3" BeginTime="0:0:1" Completed="framemove_completedloading_hidding" />
            <DoubleAnimation Storyboard.TargetName="frame_main" Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:0.3" BeginTime="0:0:1" />
        </Storyboard>
    </metro:Window.Resources>

    <metro:Window.ApplicationBar>
        <metro:ApplicationBar x:Name="appbar" HorizontalContentAlignment="Stretch" IsManipulationEnabled="True" StaysOpen="False">
            <metro:DropDownCommandButton Header="Games" Margin="{Binding (params:General.BoldPadding), RelativeSource={RelativeSource Self}}" Click="image_game_MouseLeftButtonDown" BorderThickness="2">
                <Image x:Name="image_game1" Source="Resources/games_icon.png" Width="38" Height="38" MouseLeftButtonDown="image_game_MouseLeftButtonDown"/>
            </metro:DropDownCommandButton>
            <metro:DropDownCommandButton Header="Statistic" Margin="{Binding (params:General.BoldPadding), RelativeSource={RelativeSource Self}}" Click="image_stats_MouseLeftButtonDown">
                <Image x:Name="image_stats1" Source="Resources/stats_icon.png" Width="30" MouseLeftButtonDown="image_stats_MouseLeftButtonDown"/>
            </metro:DropDownCommandButton>
            <metro:DropDownCommandButton Header="Backup" Margin="{Binding (params:General.BoldPadding), RelativeSource={RelativeSource Self}}" Click="image_backup_MouseLeftButtonDown">
                <Image x:Name="image_backup1" Source="Resources/backup_icon.png" Width="30" MouseLeftButtonDown="image_backup_MouseLeftButtonDown"/>
            </metro:DropDownCommandButton>
            <metro:DropDownCommandButton Header="Setting" Margin="{Binding (params:General.BoldPadding), RelativeSource={RelativeSource Self}}" Click="image_setting_MouseLeftButtonDown">
                <Image x:Name="image_setting1" Source="Resources/setting_icon.png" Width="30" MouseLeftButtonDown="image_setting_MouseLeftButtonDown"/>
            </metro:DropDownCommandButton>
            <metro:DropDownCommandButton Header="About" Margin="{Binding (params:General.BoldPadding), RelativeSource={RelativeSource Self}}" metro:ApplicationBar.Dock="Right">
                <metro:DropDownCommandButton.Submenu>
                    <metro:Submenu>
                        <MenuItem Header="Web Information" Click="image_information_MouseLeftButtonDown"/>
                        <MenuItem Header="Read Changlog" Click="image_about_MouseLeftButtonDown"/>
                        <MenuItem Header="Check for Update" Click="image_update_MouseLeftButtonDown"/>
                        <MenuItem Header="License" Click="image_license_MouseLeftButtonDown"/>
                    </metro:Submenu>
                </metro:DropDownCommandButton.Submenu>
                <Image x:Name="image_about1" Source="Resources/about_icon.png" Width="30"/>
            </metro:DropDownCommandButton>
        </metro:ApplicationBar>
    </metro:Window.ApplicationBar>

    <Grid metro:ApplicationBar.PreventsOpen="true">
        <TextBox x:Name="loading1" HorizontalAlignment="Left" Height="23" Margin="442,163,0,0" TextWrapping="Wrap" Text="Loading..." VerticalAlignment="Top" Width="160" BorderThickness="0" HorizontalContentAlignment="Center" Visibility="Hidden"/>
        <metro:ProgressRing x:Name="loading2" Margin="0,198" State="Indeterminate" Visibility="Hidden"/>
        <Frame x:Name="frame_main" Content="Frame" Source="/WGM;component/PageGames.xaml" NavigationUIVisibility="Hidden"/>
        <metro:ProgressBar x:Name="theme_element" HorizontalAlignment="Left" Height="100" Margin="898,0,0,0" VerticalAlignment="Top" Width="100" Visibility="Hidden"/>
        <ListBox x:Name="theme_element1" HorizontalAlignment="Left" Height="62" Margin="533,0,0,0" VerticalAlignment="Top" Width="69" Visibility="Hidden"/>
        <metro:ProgressBar x:Name="pb_download" Height="Auto" Margin="0,191,0,192" State="Busy" Visibility="Hidden"/>
        <TextBox x:Name="textbox_status" TextWrapping="Wrap" Text="textbox" BorderThickness="0" HorizontalContentAlignment="Center" IsReadOnly="True" SelectionBrush="{x:Null}" Margin="0,210,0,0" Height="23" VerticalAlignment="Top" Background="{x:Null}" Visibility="Hidden"/>
        <Button x:Name="button_download" Content="Download" Margin="442,278,442,0" VerticalAlignment="Top" Click="Button_Click" Visibility="Hidden"/>
        <Button x:Name="button_later" Content="Later" Margin="442,323,442,0" VerticalAlignment="Top" Visibility="Hidden" Click="button_later_Click"/>
    </Grid>
</metro:Window>